package com.project.communitymanagement.controller;

import com.project.communitymanagement.common.BaseController;
import com.project.communitymanagement.common.Page;
import com.project.communitymanagement.common.ResponseEntity;
import com.project.communitymanagement.common.UrlConstant;
import com.project.communitymanagement.entity.TbSalaryAdjustmentDts;
import com.project.communitymanagement.service.TbSalaryAdjustmentDtsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@CrossOrigin
@RequestMapping("tbsalaryadjustmentdts")
public class TbSalaryAdjustmentDtsController extends BaseController<TbSalaryAdjustmentDtsService, TbSalaryAdjustmentDts> {

    @Autowired
    private TbSalaryAdjustmentDtsService tbsalaryadjustmentdtsService;

    @Override
    protected TbSalaryAdjustmentDtsService service() {
        return tbsalaryadjustmentdtsService;
    }

    @PostMapping("getAll")
    public ResponseEntity<List<TbSalaryAdjustmentDts>> getAll(@RequestBody TbSalaryAdjustmentDts tbSalaryAdjustmentDts){
        return ResponseEntity.success(tbsalaryadjustmentdtsService.getAll(tbSalaryAdjustmentDts.getUser_id()));
    }

}
